import java.io.FileReader;

public class lianxi2 {
    public static void main(String[] args) {

        try {
            FileReader re = new FileReader("C:\\1.1\\3.txt");
            int read = -1;
            int num = 0;
            char chas = 0;
            chas = '王';
            while ((read = re.read()) != -1) {
                if ((char) (read) == chas) {
                    num++;
                }
            }
            System.out.println(num);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    ;
}



